using System;
using FytSoa.Common.Utils;
using System.ComponentModel.DataAnnotations;
using FytSoa.Application.Sys;
using SqlSugar;

namespace FytSoa.Application.Erp;

/// <summary>
/// erp-盘点单表
/// </summary>
public class ErpTakestockOrderDto : AppEntity
{
    /// <summary>
    /// 编号
    /// </summary>
    [StringLength(50)]
    public string Number { get; set; }

    /// <summary>
    /// 盘点名称
    /// </summary>
    [Required]
    [StringLength(50)]
    public string Title { get; set; }
    
    /// <summary>
    /// 库房编号
    /// </summary>
    public long WarehouseId { get; set; } = 0;
    
    /// <summary>
    /// 库房
    /// </summary>
    public ErpWarehouseSimpleDto WarehouseObj { get; set; }

    /// <summary>
    /// 产品类型编号
    /// </summary>
    [Required]
    public long TypeId { get; set; } = 0;
    
    /// <summary>
    /// 产品类型
    /// </summary>
    public SysCodeSimpleDto TypeObj { get; set; }

    /// <summary>
    /// 盈亏金额
    /// </summary>
    [Required]
    public decimal PAL { get; set; } = 0;

    /// <summary>
    /// 状态
    /// </summary>
    public bool Status { get; set; } = false;

    /// <summary>
    /// 操作人
    /// </summary>
    public long OperationId { get; set; } = 0;
    
    /// <summary>
    /// 操作人
    /// </summary>
    public SysAdminSimpleDto OperationObj { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 更新人
    /// </summary>
    public string UpdateUser { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }


}